<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="Keywords" Content="婚礼包办,婚礼策划，爱情,蜜月,婚礼用品">
		<meta name="Description" Content="为用户提供婚礼策划、婚车租赁、婚纱摄影、蜜月旅行以及周边服务商品的商城，为用户提供一站式解决方案，解决用户在婚礼各个环节中遇到的困难。">
		<link rel="shortcut icon" type="image/x-icon" href="../img/static/shemher.ico" media="screen" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>相合网_高品质婚礼服务</title>
		<link rel="stylesheet" type="text/css" href="../css/mod/base.css" />
		<link rel="stylesheet" type="text/css" href="../css/page/log_reg.css" />
	</head>
	<body>
		<div class="register-bg">
			<img src="../img/online/reg-img.png" />
		</div>
		<div class="wrap">
			<div class="search-logo">
				<a href="home.html" class="mod-sprites mt30">
				</a>
			</div>
			<div class="register login-wrap">
				<!--<div class="login-shift fr">
					<a href="" class="rule unl">扫一扫登录</a>
					<span class="mod-sprites"></span>
				</div>-->
				<div class="reg-form">
					<h1 class="reg-title">账号登录</h1>
					<form action="" method="post" id="loginform">
						<ul>
							<li></li>
							<li><label for="">账号</label><input type="text" name="phonenum" id="phonenum" class="w330" value="" placeholder="手机号" /></li>
							<li><label for="">密码</label><input 	type="password" name="password" id="password" class="w330" placeholder="6-18位大小写字母或者数字"/></li>
							<li><label for="">验证码</label><input type="text" name="imgver" id="imgver" value="" class="w210" /><div class="reg-btn w100 h50 fr"><img class="yanzheng" onclick="this.src=this.src+'?'+Math.random()"  src="http://xhwed.com/xhwed.php/LoginRegistr/verify"/></div></li>
							<li><button class="reg-btn w170 h50 ml100" id="login-btn">登录</button><a href="" class="rule fr unl" >忘记密码</a></li>
						</ul>
					</form>
				</div>
				<!--<div class="app-login">
					<h1 class="reg-title">手机登录</h1>
					<div class="app-login-img">
						<img src="../img/online/160x160.png"/>
					</div>
					<p class="tc mt10 f14">打开 <a href="" class="rule unl">相合app</a>扫一扫登录</p>
				</div>-->
				<div class="other-login">
					<h1 class="reg-txt mt20 tc">第三方账号登录</h1>
					<div class="other-login-logo">
						<a href="javascript:void(0);" class="reg-txt"><i class="mod-sprites w50 h50 qq-img"></i>
						QQ登录</span></a>
						<a href="javascript:void(0);" class="reg-txt"><i class="mod-sprites w50 h50 wx-img"></i>
						<span>微信登录</span></a>
						<a href="javascript:void(0);" class="reg-txt"><i class="mod-sprites w50 h50 wb-img"></i>
						<span>微博登录</span></a>
					</div>
				</div>
			</div>
		</div>
		<script src="../js/mod/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/mod/cookie.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$("#login-btn").click(function(){
				var loginData = setJson($("#loginform"));
				 console.log(loginData); 
				$.ajax({
				type:"post",
				url:"http://xhwed.com/xhwed.php/LoginRegistr/UserLand",
				datatype:"json",
				data:loginData,
				async:true,
				success:function(data){
					data = JSON.parse(data);
					if(data.msg=="success")
					{
						setCookie("user",data.result.user,"1h");
						setCookie("username",data.result.username,"1h");
						alert("登录成功！确认跳转到首页");
						window.location.href="home.html";
					}else{
						alert(data.result);
					}
				}
			});
			return false;
			})
			
	       /*设置表单数据转json*/
			function setJson($jq) {
				var data = {};
				$jq.serializeArray().map(function(x) {
					data[x.name] = x.value;
				});
				return data;
			}
        /*切换扫一扫登录*/
//		$(".login-shift .mod-sprites").click(function(){
//			if($(".login-wrap .reg-form").is(":hidden")){
//				$(".login-wrap .reg-form").show();
//				$(".login-wrap .app-login").hide();
//			}else{
//				$(".login-wrap .reg-form").hide();
//				$(".login-wrap .app-login").show();
//			}
//		})
		</script>
	
	</body>

</html>